package lambda;

import java.io.File;
import java.io.FileFilter;

public class LambdaDemo1 {
    public static void main(String[] args) {
        FileFilter filter = new FileFilter() {
            public boolean accept(File file) {
                return file.getName().contains("F");
            }
        };

        FileFilter filter1 = (file)->{
            return file.getName().contains("F");
        };

        FileFilter filter2 = (file)->{
           return file.getName().contains("F");
        };

        FileFilter filter3 = (file)->file.getName().contains("D");

        FileFilter filter4 = f->f.getName().contains("D");


        File dir = new File("./src/main/java/file");
        File[] sub = dir.listFiles(f->f.getName().contains("F"));
    }
}
